package com.itheima.boot.activemq.listener;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class MessageListenerConfig {

    @JmsListener(destination = "itheima-queue" , containerFactory = "queueJmsListenerContainerFactory")
    public void listenerQueue(String text) {
        System.out.println(text);
    }

    @JmsListener(destination = "itheima-topic" , containerFactory = "topicJmsListenerContainerFactory")
    public void listenerTopic(String text) {
        System.out.println(text);
    }

}
